﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Net;
using System.Net.Http;
using System.Web.Http;



using OF.Component.Model;
using OF.Utility;
using OF.Utility.Logging;
using System.Text;


using Newtonsoft.Json;
using Newtonsoft.Json.Linq;
using OF.Component.Base;
using OF.Component.BLL;
using OF.Component.DTO;
using Swashbuckle.Swagger.Annotations;



namespace CWQ.Api.Controllers
{
    /// <summary>
    /// 测试控制器
    /// </summary>
    public class TestController : BaseApiController
    {
        /// <summary>
        /// 
        /// </summary>
        [HttpGet]
        [AllowAnonymous]
    
        public void Test()
        {
            var errorLog = new ErrorLog()
            {
                CreatedDate = DateTime.Now,
                RequestMethod = "post",
                RequestUrl = "logtest"
            };
            ErrorLogHelper.Error(errorLog);

            var actionLog=new ActionLog()
            {
                CreatedDate = DateTime.Now,
                RequestMethod = "post",
                RequestUrl = "logtest"
            };
            ActionLogHelper.Info(actionLog);

            var optLog=new BusinessLog()
            {
                CreateDateTime = DateTime.Now,
                ModuleName = "logtestmodulename",
                MethodName = "logtestmethodName"
            };
            BizLogHelper.Operate(optLog);

        }


    }
}
